/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * converterFrame.java
 *
 * Created on 03-Oct-2011, 12:23:36
 */
/**
 *
 * @author k00104663
 */
public class converterFrame extends javax.swing.JFrame {

    /** Creates new form converterFrame */
    public converterFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        inputPanel = new javax.swing.JPanel();
        dollarAmountLabel = new javax.swing.JLabel();
        dollarAmountJTextField = new javax.swing.JTextField();
        convertButton = new javax.swing.JButton();
        resultsPanel = new javax.swing.JPanel();
        currencyLabel = new javax.swing.JLabel();
        exchangeRatesLabel = new javax.swing.JLabel();
        ConvertedAmountLabel = new javax.swing.JLabel();
        canadianDollarTextField = new javax.swing.JTextField();
        canadianDollarConvertedAmount = new javax.swing.JTextField();
        euroTextField = new javax.swing.JTextField();
        euroConvertedAmountTextField = new javax.swing.JTextField();
        thaiBahtTextField = new javax.swing.JTextField();
        thaiBahtConvertedAmountTextField = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        canadianDollarLabel = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        euroLabel = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        thaiBahtLabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        inputPanel.setLayout(new java.awt.GridLayout());

        dollarAmountLabel.setText("Enter Dollar Amount");
        inputPanel.add(dollarAmountLabel);

        dollarAmountJTextField.setText("jTextField1");
        inputPanel.add(dollarAmountJTextField);

        convertButton.setText("Convert!");
        inputPanel.add(convertButton);

        resultsPanel.setLayout(new java.awt.GridLayout());

        currencyLabel.setText("Currency");
        resultsPanel.add(currencyLabel);

        exchangeRatesLabel.setText("Exchange Rates");
        resultsPanel.add(exchangeRatesLabel);

        ConvertedAmountLabel.setText("Converted Amount");
        resultsPanel.add(ConvertedAmountLabel);

        canadianDollarTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                canadianDollarTextFieldActionPerformed(evt);
            }
        });
        resultsPanel.add(canadianDollarTextField);
        resultsPanel.add(canadianDollarConvertedAmount);

        euroTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                euroTextFieldActionPerformed(evt);
            }
        });
        resultsPanel.add(euroTextField);
        resultsPanel.add(euroConvertedAmountTextField);
        resultsPanel.add(thaiBahtTextField);
        resultsPanel.add(thaiBahtConvertedAmountTextField);

        jPanel1.setLayout(new java.awt.GridLayout());

        canadianDollarLabel.setText("Canadian Dollar");
        jPanel1.add(canadianDollarLabel);

        jPanel2.setLayout(new java.awt.GridLayout());

        euroLabel.setText("Euro (FR)");
        jPanel2.add(euroLabel);

        jPanel3.setLayout(new java.awt.GridLayout());

        thaiBahtLabel.setText("Thai Baht");
        jPanel3.add(thaiBahtLabel);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(resultsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 804, Short.MAX_VALUE)
                    .addComponent(inputPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 804, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(50, 50, 50)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(34, 34, 34)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(inputPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(resultsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(234, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void canadianDollarTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_canadianDollarTextFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_canadianDollarTextFieldActionPerformed

    private void euroTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_euroTextFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_euroTextFieldActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(converterFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(converterFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(converterFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(converterFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new converterFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel ConvertedAmountLabel;
    private javax.swing.JTextField canadianDollarConvertedAmount;
    private javax.swing.JLabel canadianDollarLabel;
    private javax.swing.JTextField canadianDollarTextField;
    private javax.swing.JButton convertButton;
    private javax.swing.JLabel currencyLabel;
    private javax.swing.JTextField dollarAmountJTextField;
    private javax.swing.JLabel dollarAmountLabel;
    private javax.swing.JTextField euroConvertedAmountTextField;
    private javax.swing.JLabel euroLabel;
    private javax.swing.JTextField euroTextField;
    private javax.swing.JLabel exchangeRatesLabel;
    private javax.swing.JPanel inputPanel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel resultsPanel;
    private javax.swing.JTextField thaiBahtConvertedAmountTextField;
    private javax.swing.JLabel thaiBahtLabel;
    private javax.swing.JTextField thaiBahtTextField;
    // End of variables declaration//GEN-END:variables
}
